
import { _decorator, log } from 'cc';
import { App } from '../../../Script/App';
import { SceneBase } from '../../../Script/SceneBase';
import { Popup, PopupResult } from '../../Public/Script/Popup';
import { Toast } from '../../Public/Script/Toast';
const { ccclass, property } = _decorator;

@ccclass('Test')
export class Test extends SceneBase {
    async start() {
        super.start()
    }

    onBtnToast() {
        Toast.show('你能不能把钱还给我')
    }

    onBtnPopup() {
        Popup.show({
            title: '登高', msg: `风急天高猿啸哀，渚清沙白鸟飞回。
无边落木萧萧下，不尽长江滚滚来。
万里悲秋常作客，百年多病独登台。
艰难苦恨繁霜鬓，潦倒新停浊酒杯。` })
            .then(v => {
                if (v == PopupResult.Yes) {
                    log('yes')
                }
                else {
                    log('no')
                }
            })
    }

    onBtnTarot() {
        App.changeScene('Tarot', 'Tarot')
    }
}
